#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include <iostream.h>
#include <fstream.h>

#include <netdb.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>

typedef struct _UrlStruct_ {
    char *	protocol;
    char *	host;
    int		port;
    char *	path;
    char *      file;
    ulong       size;
    char *      md5;
} UrlStruct;

class HyperTextTransfer
{
	public:
	
                HyperTextTransfer();
		~HyperTextTransfer();
	
                void ParseUrl(char * url, UrlStruct * ret);
                char * ResolveHostname(char * host);
                char * GetFilename(char * path);
                UrlStruct PerformDownload(char * uName);
	
};
